// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addExam POST /api/exam/add */
export async function addExamUsingPost(body: API.ExamAddRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseLong_>('/api/exam/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** deleteExam POST /api/exam/delete */
export async function deleteExamUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/exam/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getExamById GET /api/exam/get */
export async function getExamByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getExamByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseExam_>('/api/exam/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listExam POST /api/exam/list */
export async function listExamUsingPost(
  body: API.ExamQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListExam_>('/api/exam/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listExamByPage POST /api/exam/list/page */
export async function listExamByPageUsingPost(
  body: API.ExamQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageExam_>('/api/exam/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** updateExam POST /api/exam/update */
export async function updateExamUsingPost(
  body: API.ExamUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/exam/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
